﻿using UnityEngine;
using System.Collections.Generic;
using System.IO;

public class LoginUI : MonoBehaviour
{
    private UserModel user;

    void Start()
    {
        user = Engine.GameSystem.ReadUser();
    }

    public void ButtonStart()
    {
        if (user.userName.Equals(""))
        {
            Engine.UISystem.Next("Name");
        }
        else
        {
            Engine.UISystem.Next("Loading");
        }

        /*if (!File.Exists(Engine.File("UserData")))
        {
            Engine.GameSystem.ResetUser();
        }
        if (!File.Exists(Engine.File("StageData")))
        {
            Engine.GameSystem.ResetStage();
        }*/
    }
}
